from flask import Blueprint
from src.api.routes.football_routes import register_football_routes
from src.utils.logger import log_info

def create_api_blueprint():
    bp = Blueprint('api', __name__)
    
    # 导入并注册路由
    from src.api.routes.classification_routes import register_classification_routes
    from src.api.routes.merge_routes import register_merge_routes
    from src.api.routes.search_routes import register_search_routes
    from src.api.routes.tool_routes import register_upload_routes
    from src.api.routes.copywriting_routes import register_copywriting_routes
    
    log_info("注册分类API路由...")
    register_classification_routes(bp)
    
    log_info("注册混搭API路由...")
    register_merge_routes(bp)
    
    log_info("注册搜索API路由...")
    register_search_routes(bp)
    
    log_info("注册工具API路由...")
    register_upload_routes(bp)
    
    log_info("注册文案处理API路由...")
    register_copywriting_routes(bp)
    
    log_info("注册足球相关API路由...")
    register_football_routes(bp)
    
    log_info("API蓝图创建完成")
    return bp